package com.zhouyu;

import com.zhouyu.common.Invocation;
import com.zhouyu.protocol.HttpClient;
import com.zhouyu.proxy.ProxyFactory;

public class Consumer {

    public static void main(String[] args) {

        HelloService helloService = ProxyFactory.getProxy(HelloService.class);
        String result = helloService.sayHello("linlw100");
        System.out.println("result = " + result);

//        Invocation invocation = new Invocation(HelloService.class.getName(), "sayHello",
//                new Class[]{String.class}, new Object[]{"zhouyu"});
//        HttpClient httpClient = new HttpClient();
//        String result = httpClient.send("localhost", 8080, invocation);
//        System.out.println(result);
    }
}
